From: Luc Teirlinck Date: Sat, 27 Mar 2004 01:08:15 +0000 (+0000) Subject: (buffer-stale-function): Moved here from autorevert.el. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~23485 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=45bae4a05c12fa1902a98c74202fd7658ef82244;p=emacs.git (buffer-stale-function): Moved here from autorevert.el. --- diff --git a/lisp/files.el b/lisp/files.el index eb6d1635fc9..fd97afa3073 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3454,6 +3454,19 @@ and second, t if reading the auto-save file. The function you specify is responsible for updating (or preserving) point.") +(defvar buffer-stale-function nil + "Function to check whether a non-file buffer needs reverting. +This should be a function with one optional argument NOCONFIRM. +Auto Revert Mode sets NOCONFIRM to t. The function should return +non-nil if the buffer should be reverted. The buffer is current +when this function is called. + +The idea behind the NOCONFIRM argument is that the same function +can also be used to ask the user whether the buffer should be +reverted. In such a situation one has to be less careful about, +say, reverting remote files, than if the function is called at +regular intervals by Auto Revert Mode.") + (defvar before-revert-hook nil "Normal hook for `revert-buffer' to run before reverting. If `revert-buffer-function' is used to override the normal revert